package com.sto.transport.capability.excel;

import java.util.Map;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;

import cn.sto.transport.capacity.dto.request.base.ExportExcelRequest;
import cn.sto.transport.capacity.dto.request.base.ImportExcelRequest;
import cn.sto.transport.capacity.dto.response.excel.ImportExcelResponse;
import org.springframework.validation.annotation.Validated;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2021/11/1 13:28
 */
@Validated
public interface BaseExcelServiceManage {
    /**
     * 导出EXCEL并返回上传URL
     *
     * @param request
     * @return
     */
    String exportAndUploadExcel(@Valid ExportExcelRequest request);

    /**
     * 导出EXCEL并返回上传URL
     * 重载方法，兼容导出中心 泛化调用
     *
     * @param queryMap
     * @return
     */
    String exportAndUploadExcel(@NotEmpty Map<String, String> queryMap);

    /**
     * 导入EXCEL
     *
     * @param request
     * @return
     */
    ImportExcelResponse importExcel(@Valid ImportExcelRequest request);
}
